package com.roger.mybatisplus.demo.util;

import com.roger.mybatisplus.demo.entity.Users;

public class UserInfoContext {
    private static ThreadLocal<Users> userInfo = new ThreadLocal();


    public UserInfoContext() {
    }

    public static Users getUser(){
        return (Users)userInfo.get();
    }

    public static void setUser(Users user){
        userInfo.set(user);
    }

}
